home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / What's New? / Development Kits / Display Manager SDK v1.1 / Compiler & Runtime Files / • New universal header files • / AIncludes / Video.a < prev   
Encoding:
Text File  |  1996-03-05  |  30.8 KB  |  652 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Video.a
  3. ;
  4. ;    Contains:    Video Driver Interfaces.
  5. ;
  6. ;     Version:    Technology:    System 7.5
  7. ;                 Package:    Universal Interfaces in “Display Manager Development Kit” (post ETO #18)
  8. ;                Date:        3/5/96 
  9. ;
  10. ;     Copyright:    © 1984-1995 by Apple Computer, Inc.
  11. ;                 All rights reserved.
  12. ;     Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                 stack.  Include the file and version information (from above)
  14. ;                 in the problem description and send to:
  15. ;                     Internet:    apple.bugs@applelink.apple.com
  16. ;                     AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__VIDEO__') = 'UNDEFINED' THEN
  21. __VIDEO__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27. ;        include 'Types.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'MixedMode.a'                                        ;
  30. ;        include 'QuickdrawText.a'                                    ;
  31.  
  32. mBaseOffset                        EQU        1                    ;Id of mBaseOffset.
  33. mRowBytes                        EQU        2                    ;Video sResource parameter Id's 
  34. mBounds                            EQU        3                    ;Video sResource parameter Id's 
  35. mVersion                        EQU        4                    ;Video sResource parameter Id's 
  36. mHRes                            EQU        5                    ;Video sResource parameter Id's 
  37. mVRes                            EQU        6                    ;Video sResource parameter Id's 
  38. mPixelType                        EQU        7                    ;Video sResource parameter Id's 
  39. mPixelSize                        EQU        8                    ;Video sResource parameter Id's 
  40. mCmpCount                        EQU        9                    ;Video sResource parameter Id's 
  41. mCmpSize                        EQU        10                    ;Video sResource parameter Id's 
  42. mPlaneBytes                        EQU        11                    ;Video sResource parameter Id's 
  43. mVertRefRate                    EQU        14                    ;Video sResource parameter Id's 
  44. mVidParams                        EQU        1                    ;Video parameter block id.
  45. mTable                            EQU        2                    ;Offset to the table.
  46. mPageCnt                        EQU        3                    ;Number of pages
  47. mDevType                        EQU        4                    ;Device Type
  48. oneBitMode                        EQU        128                    ;Id of OneBitMode Parameter list.
  49. twoBitMode                        EQU        129                    ;Id of TwoBitMode Parameter list.
  50. fourBitMode                        EQU        130                    ;Id of FourBitMode Parameter list.
  51. eightBitMode                    EQU        131                    ;Id of EightBitMode Parameter list.
  52.  
  53. sixteenBitMode                    EQU        132                    ;Id of SixteenBitMode Parameter list.
  54. thirtyTwoBitMode                EQU        133                    ;Id of ThirtyTwoBitMode Parameter list.
  55. firstVidMode                    EQU        128                    ;The new, better way to do the above. 
  56. secondVidMode                    EQU        129                    ; QuickDraw only supports six video 
  57. thirdVidMode                    EQU        130                    ; at this time.      
  58. fourthVidMode                    EQU        131
  59. fifthVidMode                    EQU        132
  60. sixthVidMode                    EQU        133
  61. spGammaDir                        EQU        64
  62. spVidNamesDir                    EQU        65
  63.  
  64. ; csTimingFormat values in VDTimingInfo 
  65. ; look in the declaration rom for timing info 
  66. kDeclROMtables                    EQU        'decl'
  67.  
  68. ; Timing mode constants for Display Manager MultiMode support
  69. ;    Corresponding    .h equates are in Video.h
  70. ;                    .a equates are in Video.a
  71. ;                    .r equates are in DepVideoEqu.r
  72. ;    
  73. ;    The first enum is the old names (for compatibility).
  74. ;    The second enum is the new names.
  75. ;
  76. timingApple12                    EQU        130                    ;  512x384 (60 Hz) Rubik timing.
  77. timingApple12x                    EQU        135                    ;  560x384 (60 Hz) Rubik-560 timing.
  78. timingApple13                    EQU        140                    ;  640x480 (67 Hz) HR timing.
  79. timingApple13x                    EQU        145                    ;  640x400 (67 Hz) HR-400 timing.
  80. timingAppleVGA                    EQU        150                    ;  640x480  (60 Hz) VGA timing.
  81. timingApple15                    EQU        160                    ;  640x870 (75 Hz) FPD timing.
  82. timingApple15x                    EQU        165                    ;  640x818 (75 Hz) FPD-818 timing.
  83. timingApple16                    EQU        170                    ;  832x624 (75 Hz) GoldFish timing.
  84. timingAppleSVGA                    EQU        180                    ;  800x600  (56 Hz) SVGA timing.
  85. timingApple1Ka                    EQU        190                    ; 1024x768 (60 Hz) VESA 1K-60Hz timing.
  86. timingApple1Kb                    EQU        200                    ; 1024x768 (70 Hz) VESA 1K-70Hz timing.
  87. timingApple19                    EQU        210                    ; 1024x768  (75 Hz) Apple 19" RGB.
  88. timingApple21                    EQU        220                    ; 1152x870  (75 Hz) Apple 21" RGB.
  89.  
  90. timingInvalid                    EQU        0                    ; Unknown timing… force user to confirm.
  91. timingApple_512x384_60hz        EQU        130                    ;  512x384  (60 Hz) Rubik timing.
  92. timingApple_560x384_60hz        EQU        135                    ;  560x384  (60 Hz) Rubik-560 timing.
  93. timingApple_640x480_67hz        EQU        140                    ;  640x480  (67 Hz) HR timing.
  94. timingApple_640x400_67hz        EQU        145                    ;  640x400  (67 Hz) HR-400 timing.
  95. timingVESA_640x480_60hz            EQU        150                    ;  640x480  (60 Hz) VGA timing.
  96. timingApple_640x870_75hz        EQU        160                    ;  640x870  (75 Hz) FPD timing.
  97. timingApple_640x818_75hz        EQU        165                    ;  640x818  (75 Hz) FPD-818 timing.
  98. timingApple_832x624_75hz        EQU        170                    ;  832x624  (75 Hz) GoldFish timing.
  99. timingVESA_800x600_56hz            EQU        180                    ;  800x600  (56 Hz) SVGA timing.
  100. timingVESA_800x600_60hz            EQU        182                    ;  800x600  (60 Hz) SVGA timing.
  101. timingVESA_800x600_72hz            EQU        184                    ;  800x600  (72 Hz) SVGA timing.
  102. timingVESA_800x600_75hz            EQU        186                    ;  800x600  (75 Hz) SVGA timing.
  103. timingVESA_1024x768_60hz        EQU        190                    ; 1024x768  (60 Hz) VESA 1K-60Hz timing.
  104. timingVESA_1024x768_70hz        EQU        200                    ; 1024x768  (70 Hz) VESA 1K-70Hz timing.
  105. timingVESA_1024x768_75hz        EQU        204                    ; 1024x768  (75 Hz) VESA 1K-70Hz timing (very similar to timingApple_1024x768_75hz).
  106. timingApple_1024x768_75hz        EQU        210                    ; 1024x768  (75 Hz) Apple 19" RGB.
  107. timingApple_1152x870_75hz        EQU        220                    ; 1152x870  (75 Hz) Apple 21" RGB.
  108. timingAppleNTSC_ST                EQU        230                    ;  512x384  (60 Hz, interlaced, non-convolved).
  109. timingAppleNTSC_FF                EQU        232                    ;  640x480  (60 Hz, interlaced, non-convolved).
  110. timingAppleNTSC_STconv            EQU        234                    ;  512x384  (60 Hz, interlaced, convolved).
  111. timingAppleNTSC_FFconv            EQU        236                    ;  640x480  (60 Hz, interlaced, convolved).
  112. timingApplePAL_ST                EQU        238                    ;  640x480  (50 Hz, interlaced, non-convolved).
  113. timingApplePAL_FF                EQU        240                    ;  768x576  (50 Hz, interlaced, non-convolved).
  114. timingApplePAL_STconv            EQU        242                    ;  640x480  (50 Hz, interlaced, convolved).
  115. timingApplePAL_FFconv            EQU        244                    ;  768x576  (50 Hz, interlaced, convolved).
  116. timingVESA_1280x960_75hz        EQU        250                    ; 1280x960  (75 Hz)
  117. timingVESA_1280x1024_60hz        EQU        260                    ; 1280x1024 (60 Hz)
  118. timingVESA_1280x1024_75hz        EQU        262                    ; 1280x1024 (75 Hz)
  119. timingVESA_1600x1200_60hz        EQU        280                    ; 1600x1200 (60 Hz) VESA proposed timing.
  120. timingVESA_1600x1200_65hz        EQU        282                    ; 1600x1200 (65 Hz) VESA proposed timing.
  121. timingVESA_1600x1200_70hz        EQU        284                    ; 1600x1200 (70 Hz) VESA proposed timing.
  122. timingVESA_1600x1200_75hz        EQU        286                    ; 1600x1200 (75 Hz) VESA proposed timing.
  123. timingVESA_1600x1200_80hz        EQU        288                    ; 1600x1200 (80 Hz) VESA proposed timing (pixel clock is 216 Mhz dot clock).
  124. timingSMPTE240M_60hz            EQU        400                    ; 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035.
  125. timingFilmRate_48hz                EQU        410                    ; 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480.
  126.  
  127. ; csConnectFlags values in VDDisplayConnectInfo 
  128. kAllModesValid                    EQU        0                    ; All modes not trimmed by primary init are good close enough to try 
  129. kAllModesSafe                    EQU        1                    ; All modes not trimmed by primary init are know to be safe 
  130. kReportsTagging                    EQU        2                    ; Can detect tagged displays (to identify smart monitors) 
  131. kHasDirectConnection            EQU        3                    ; True implies that driver can talk directly to device (e.g. serial data link via sense lines) 
  132. kIsMonoDev                        EQU        4                    ; Says whether there’s an RGB (0) or Monochrome (1) connection. 
  133. kUncertainConnection            EQU        5                    ; There may not be a display (no sense lines?). 
  134. kTaggingInfoNonStandard            EQU        6                    ; Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). 
  135. kReportsDDCConnection            EQU        7                    ; Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). 
  136. kHasDDCConnection                EQU        8                    ; Card has ddc connect now. 
  137.  
  138. ; csDisplayType values in VDDisplayConnectInfo 
  139. kUnknownConnect                    EQU        1                    ; Not sure how we’ll use this, but seems like a good idea. 
  140. kPanelConnect                    EQU        2                    ; For use with fixed-in-place LCD panels. 
  141. kPanelTFTConnect                EQU        2                    ; Alias for kPanelConnect 
  142. kFixedModeCRTConnect            EQU        3                    ;  For use with fixed-mode (i.e., very limited range) displays. 
  143. kMultiModeCRT1Connect            EQU        4                    ; 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe 
  144. kMultiModeCRT2Connect            EQU        5                    ; 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe 
  145. kMultiModeCRT3Connect            EQU        6                    ; 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain 
  146. kMultiModeCRT4Connect            EQU        7                    ; Expansion to large multi mode (not yet used) 
  147. kModelessConnect                EQU        8                    ; Expansion to modeless model (not yet used) 
  148. kFullPageConnect                EQU        9                    ; 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) 
  149. kVGAConnect                        EQU        10                    ; 640x480 VGA default -- question everything else 
  150. kNTSCConnect                    EQU        11                    ; NTSC ST (default), FF, STconv, FFconv 
  151. kPALConnect                        EQU        12                    ; PAL ST (default), FF, STconv, FFconv 
  152. kHRConnect                        EQU        13                    ; Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) 
  153. kPanelFSTNConnect                EQU        14                    ; For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels 
  154. kMonoTwoPageConnect                EQU        15                    ; 1152x870 Apple color two-page display 
  155. kColorTwoPageConnect            EQU        16                    ; 1152x870 Apple B&W two-page display 
  156. kColor16Connect                    EQU        17                    ; 832x624 Apple B&W two-page display 
  157. kColor19Connect                    EQU        18                    ; 1024x768 Apple B&W two-page display 
  158.  
  159. ; csTimingFlags values in VDTimingInfoRec 
  160. kModeValid                        EQU        0                    ; Says that this mode should NOT be trimmed. 
  161. kModeSafe                        EQU        1                    ; This mode does not need confirmation 
  162. kModeDefault                    EQU        2                    ; This is the default mode for this type of connection 
  163. kModeShowNow                    EQU        3                    ; This mode should always be shown (even though it may require a confirm) 
  164. kModeNotResize                    EQU        4                    ; This mode should not be used to resize the display (eg. mode selects a different connector on card) 
  165. kModeRequiresPan                EQU        5                    ; This mode has more pixels than are actually displayed 
  166. kModeInterlaced                    EQU        6                    ; This mode is interlaced (single pixel lines look bad). 
  167. kModeShowNever                    EQU        7                    ; This mode should not be shown in the user interface. 
  168.  
  169. ; csResolutionFlags bit flags for VDResolutionInfoRec 
  170. kResolutionHasMultipleDepthSizes EQU        0                    ; Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) 
  171.  
  172. ;    Power Mode constants for VDPowerStateRec.powerState.    
  173. kAVPowerOff                        EQU        0
  174. kAVPowerStandby                    EQU        1
  175. kAVPowerSuspend                    EQU        2
  176. kAVPowerOn                        EQU        3
  177.  
  178. ;    Power Mode masks and bits for VDPowerStateRec.powerFlags.    
  179. kPowerStateNeedsRefresh            EQU        0
  180. kPowerStateNeedsRefreshMask        EQU        (1 << 0)
  181.  
  182. ; Control Codes 
  183. cscReset                        EQU        0
  184. cscKillIO                        EQU        1
  185. cscSetMode                        EQU        2
  186. cscSetEntries                    EQU        3
  187. cscSetGamma                        EQU        4
  188. cscGrayPage                        EQU        5
  189. cscGrayScreen                    EQU        5
  190. cscSetGray                        EQU        6
  191. cscSetInterrupt                    EQU        7
  192. cscDirectSetEntries                EQU        8
  193. cscSetDefaultMode                EQU        9
  194. cscSwitchMode                    EQU        10
  195. cscSetSync                        EQU        11
  196. cscSavePreferredConfiguration    EQU        16
  197. cscSetHardwareCursor            EQU        22
  198. cscDrawHardwareCursor            EQU        23
  199. cscSetConvolution                EQU        24
  200. cscSetPowerState                EQU        25
  201. cscUnusedCall                    EQU        127                    ; This call used to expend the scrn resource.  Its imbedded data contains more control info 
  202.  
  203. ; Status Codes 
  204. cscGetMode                        EQU        2
  205. cscGetEntries                    EQU        3
  206. cscGetPageCnt                    EQU        4
  207. cscGetPages                        EQU        4                    ; This is what C&D 2 calls it. 
  208. cscGetPageBase                    EQU        5
  209. cscGetBaseAddr                    EQU        5                    ; This is what C&D 2 calls it. 
  210. cscGetGray                        EQU        6
  211. cscGetInterrupt                    EQU        7
  212. cscGetGamma                        EQU        8
  213. cscGetDefaultMode                EQU        9
  214. cscGetCurMode                    EQU        10
  215. cscGetSync                        EQU        11
  216. cscGetConnection                EQU        12                    ; Return information about the connection to the display 
  217. cscGetModeTiming                EQU        13                    ; Return timing info for a mode 
  218. cscGetModeBaseAddress            EQU        14                    ; Return base address information about a particular mode 
  219. cscGetScanProc                    EQU        15                    ; QuickTime scan chasing routine 
  220. cscGetPreferredConfiguration    EQU        16
  221. cscGetNextResolution            EQU        17
  222. cscGetVideoParameters            EQU        18
  223. cscGetGammaInfoList                EQU        20
  224. cscRetrieveGammaTable            EQU        21
  225. cscSupportsHardwareCursor        EQU        22
  226. cscGetHardwareCursorDrawState    EQU        23
  227. cscGetConvolution                EQU        24
  228. cscGetPowerState                EQU        25
  229.  
  230. ; Bit definitions for the Get/Set Sync call
  231. kDisableHorizontalSyncBit        EQU        0
  232. kDisableVerticalSyncBit            EQU        1
  233. kDisableCompositeSyncBit        EQU        2
  234. kEnableSyncOnBlue                EQU        3
  235. kEnableSyncOnGreen                EQU        4
  236. kEnableSyncOnRed                EQU        5
  237. kNoSeparateSyncControlBit        EQU        6
  238. kTriStateSyncBit                EQU        7
  239. kHorizontalSyncMask                EQU        $01
  240. kVerticalSyncMask                EQU        $02
  241. kCompositeSyncMask                EQU        $04
  242. kDPMSSyncMask                    EQU        $07
  243. kTriStateSyncMask                EQU        $80
  244. kSyncOnBlueMask                    EQU        $08
  245. kSyncOnGreenMask                EQU        $10
  246. kSyncOnRedMask                    EQU        $20
  247. kSyncOnMask                        EQU        $38
  248.  
  249. ;    Power Mode constants for translating DPMS modes to Get/SetSync calls.    
  250. kDPMSSyncOn                        EQU        0
  251. kDPMSSyncStandby                EQU        1
  252. kDPMSSyncSuspend                EQU        2
  253. kDPMSSyncOff                    EQU        7
  254.  
  255. kConvolved                        EQU        0
  256. kLiveVideoPassThru                EQU        1
  257. kConvolvedMask                    EQU        $01
  258. kLiveVideoPassThruMask            EQU        $02
  259.  
  260. VPBlock                 RECORD    0
  261. vpBaseOffset             ds.l   1        ; offset: $0 (0)        ;Offset to page zero of video RAM (From minorBaseOS).
  262. vpRowBytes                 ds.w   1        ; offset: $4 (4)        ;Width of each row of video memory.
  263. vpBounds                 ds     Rect    ; offset: $6 (6)        ;BoundsRect for the video display (gives dimensions).
  264. vpVersion                 ds.w   1        ; offset: $E (14)        ;PixelMap version number.
  265. vpPackType                 ds.w   1        ; offset: $10 (16)
  266. vpPackSize                 ds.l   1        ; offset: $12 (18)
  267. vpHRes                     ds.l   1        ; offset: $16 (22)        ;Horizontal resolution of the device (pixels per inch).
  268. vpVRes                     ds.l   1        ; offset: $1A (26)        ;Vertical resolution of the device (pixels per inch).
  269. vpPixelType                 ds.w   1        ; offset: $1E (30)        ;Defines the pixel type.
  270. vpPixelSize                 ds.w   1        ; offset: $20 (32)        ;Number of bits in pixel.
  271. vpCmpCount                 ds.w   1        ; offset: $22 (34)        ;Number of components in pixel.
  272. vpCmpSize                 ds.w   1        ; offset: $24 (36)        ;Number of bits per component
  273. vpPlaneBytes             ds.l   1        ; offset: $26 (38)        ;Offset from one plane to the next.
  274. sizeof                     EQU *            ; size:   $2A (42)
  275.                         ENDR
  276.  
  277. ; typedef struct VPBlock     VPBlock
  278. ; typedef VPBlock             *VPBlockPtr
  279. VDEntryRecord             RECORD    0
  280. csTable                     ds.l   1        ; offset: $0 (0)        ;(long) pointer to color table entry=value, r,g,b:INTEGER
  281. sizeof                     EQU *            ; size:   $4 (4)
  282.                         ENDR
  283.  
  284. ; typedef struct VDEntryRecord  VDEntryRecord
  285. ; typedef VDEntryRecord     *VDEntRecPtr
  286. ; Parm block for SetGray control call 
  287. VDGrayRecord             RECORD    0
  288. csMode                     ds.b   1        ; offset: $0 (0)        ;Same as GDDevType value (0=color, 1=mono)
  289. filler                     ds.b   1        ; offset: $1 (1)
  290. sizeof                     EQU *            ; size:   $2 (2)
  291.                         ENDR
  292.  
  293. ; typedef struct VDGrayRecord  VDGrayRecord
  294. ; typedef VDGrayRecord         *VDGrayPtr
  295. ; Parm block for SetInterrupt call 
  296. VDFlagRecord             RECORD    0
  297. csMode                     ds.b   1        ; offset: $0 (0)
  298. filler                     ds.b   1        ; offset: $1 (1)
  299. sizeof                     EQU *            ; size:   $2 (2)
  300.                         ENDR
  301.  
  302. ; typedef struct VDFlagRecord  VDFlagRecord
  303. ; typedef VDFlagRecord         *VDFlagRecPtr
  304. ; Parm block for SetEntries control call 
  305. VDSetEntryRecord         RECORD    0
  306. csTable                     ds.l   1        ; offset: $0 (0)        ;Pointer to an array of color specs
  307. csStart                     ds.w   1        ; offset: $4 (4)        ;Which spec in array to start with, or -1
  308. csCount                     ds.w   1        ; offset: $6 (6)        ;Number of color spec entries to set
  309. sizeof                     EQU *            ; size:   $8 (8)
  310.                         ENDR
  311.  
  312. ; typedef struct VDSetEntryRecord  VDSetEntryRecord
  313. ; typedef VDSetEntryRecord     *VDSetEntryPtr
  314. ; Parm block for SetGamma control call 
  315. VDGammaRecord             RECORD    0
  316. csGTable                 ds.l   1        ; offset: $0 (0)        ;pointer to gamma table
  317. sizeof                     EQU *            ; size:   $4 (4)
  318.                         ENDR
  319.  
  320. ; typedef struct VDGammaRecord  VDGammaRecord
  321. ; typedef VDGammaRecord     *VDGamRecPtr
  322. VDBaseAddressInfoRec     RECORD    0
  323. csDevData                 ds.l   1        ; offset: $0 (0)        ; LONGINT - (long) timing mode 
  324. csDevBase                 ds.l   1        ; offset: $4 (4)        ; LONGINT - (long) base address of the mode 
  325. csModeReserved             ds.w   1        ; offset: $8 (8)        ; INTEGER - (short) will some day be the depth 
  326. csModeBase                 ds.l   1        ; offset: $A (10)        ; LONGINT - (long) reserved 
  327. sizeof                     EQU *            ; size:   $E (14)
  328.                         ENDR
  329.  
  330. ; typedef struct VDBaseAddressInfoRec  VDBaseAddressInfoRec, *VDBaseAddressInfoPtr
  331. VDSwitchInfoRec         RECORD    0
  332. csMode                     ds.w   1        ; offset: $0 (0)        ;(word) mode depth
  333. csData                     ds.l   1        ; offset: $2 (2)        ;(long) functional sResource of mode
  334. csPage                     ds.w   1        ; offset: $6 (6)        ;(word) page to switch in
  335. csBaseAddr                 ds.l   1        ; offset: $8 (8)        ;(long) base address of page (return value)
  336. csReserved                 ds.l   1        ; offset: $C (12)        ;(long) Reserved (set to 0) 
  337. sizeof                     EQU *            ; size:   $10 (16)
  338.                         ENDR
  339.  
  340. ; typedef struct VDSwitchInfoRec  VDSwitchInfoRec
  341. ; typedef VDSwitchInfoRec     *VDSwitchInfoPtr
  342. VDTimingInfoRec         RECORD    0
  343. csTimingMode             ds.l   1        ; offset: $0 (0)        ; LONGINT - (long) timing mode (a la InitGDevice) 
  344. csTimingReserved         ds.l   1        ; offset: $4 (4)        ; LONGINT - (long) reserved 
  345. csTimingFormat             ds.l   1        ; offset: $8 (8)        ; LONGINT - (long) what format is the timing info 
  346. csTimingData             ds.l   1        ; offset: $C (12)        ; LONGINT - (long) data supplied by driver 
  347. csTimingFlags             ds.l   1        ; offset: $10 (16)        ; LONGINT - (long) mode within device 
  348. sizeof                     EQU *            ; size:   $14 (20)
  349.                         ENDR
  350.  
  351. ; typedef struct VDTimingInfoRec  VDTimingInfoRec
  352. ; typedef VDTimingInfoRec     *VDTimingInfoPtr
  353. VDDisplayConnectInfoRec RECORD    0
  354. csDisplayType             ds.w   1        ; offset: $0 (0)        ; INTEGER - (word) Type of display connected 
  355. csConnectTaggedType         ds.b   1        ; offset: $2 (2)        ; BYTE - type of tagging 
  356. csConnectTaggedData         ds.b   1        ; offset: $3 (3)        ; BYTE - tagging data 
  357. csConnectFlags             ds.l   1        ; offset: $4 (4)        ; LONGINT - (long) tell us about the connection 
  358. csDisplayComponent         ds.l   1        ; offset: $8 (8)        ; LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) 
  359. csConnectReserved         ds.l   1        ; offset: $C (12)        ; LONGINT - (long) reserved 
  360. sizeof                     EQU *            ; size:   $10 (16)
  361.                         ENDR
  362.  
  363. ; typedef struct VDDisplayConnectInfoRec  VDDisplayConnectInfoRec
  364. ; typedef VDDisplayConnectInfoRec  *VDDisplayConnectInfoPtr
  365. ; RawSenseCode
  366. ;    This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  367. ;    for the possible raw sense code values when 'standard' sense code hardware is implemented.
  368. ;
  369. ;    For 'standard' sense code hardware, the raw sense is obtained as follows:
  370. ;        • Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  371. ;        • Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  372. ;
  373. ;    IMPORTANT Note: 
  374. ;    When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  375. ;    are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  376. ;
  377. ;
  378. ; typedef unsigned char     RawSenseCode
  379.  
  380. kRSCZero                        EQU        0
  381. kRSCOne                            EQU        1
  382. kRSCTwo                            EQU        2
  383. kRSCThree                        EQU        3
  384. kRSCFour                        EQU        4
  385. kRSCFive                        EQU        5
  386. kRSCSix                            EQU        6
  387. kRSCSeven                        EQU        7
  388.  
  389. ; ExtendedSenseCode
  390. ;    This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  391. ;    for the values which are possible when the extended sense algorithm is applied to hardware
  392. ;    which implements 'standard' sense code hardware.
  393. ;
  394. ;     For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  395. ;    (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  396. ;        • Drive sense line 'A' low and read the values of 'B' and 'C'.  
  397. ;        • Drive sense line 'B' low and read the values of 'A' and 'C'.
  398. ;        • Drive sense line 'C' low and read the values of 'A' and 'B'.
  399. ;
  400. ;    In this way, a six-bit number of the form BC/AC/AB is generated. 
  401. ;
  402. ;    IMPORTANT Note: 
  403. ;    When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  404. ;    are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  405. ;
  406. ;
  407. ; typedef unsigned char     ExtendedSenseCode
  408.  
  409. kESCZero21Inch                    EQU        $00                    ; 21" RGB                                 
  410. kESCOnePortraitMono                EQU        $14                    ; Portrait Monochrome                     
  411. kESCTwo12Inch                    EQU        $21                    ; 12" RGB                                
  412. kESCThree21InchRadius            EQU        $31                    ; 21" RGB (Radius)                        
  413. kESCThree21InchMonoRadius        EQU        $34                    ; 21" Monochrome (Radius)                 
  414. kESCThree21InchMono                EQU        $35                    ; 21" Monochrome                        
  415. kESCFourNTSC                    EQU        $0A                    ; NTSC                                 
  416. kESCFivePortrait                EQU        $1E                    ; Portrait RGB                         
  417. kESCSixMSB1                        EQU        $03                    ; MultiScan Band-1 (12" thru 1Six")    
  418. kESCSixMSB2                        EQU        $0B                    ; MultiScan Band-2 (13" thru 19")        
  419. kESCSixMSB3                        EQU        $23                    ; MultiScan Band-3 (13" thru 21")        
  420. kESCSixStandard                    EQU        $2B                    ; 13"/14" RGB or 12" Monochrome        
  421. kESCSevenPAL                    EQU        $00                    ; PAL                                    
  422. kESCSevenNTSC                    EQU        $14                    ; NTSC                                 
  423. kESCSevenVGA                    EQU        $17                    ; VGA                                     
  424. kESCSeven16Inch                    EQU        $2D                    ; 16" RGB (GoldFish)                      
  425. kESCSevenPALAlternate            EQU        $30                    ; PAL (Alternate)                         
  426. kESCSeven19Inch                    EQU        $3A                    ; Third-Party 19”                        
  427. kESCSevenNoDisplay                EQU        $3F                    ; No display connected                 
  428.  
  429. ; DepthMode
  430. ;    This abstract data type is used to to reference RELATIVE pixel depths.
  431. ;    Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  432. ;
  433. ;    Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  434. ;    graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  435. ;    hardware, 'kDepthMode1' may represent 8BPP.
  436. ;
  437. ;    DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  438. ;    behave as expected.  The values of the constants which comprise the set are such
  439. ;    that 'kDepthMode4 < kDepthMode6' behaves as expected.
  440. ;
  441. ; typedef unsigned short     DepthMode
  442.  
  443. kDepthMode1                        EQU        128
  444. kDepthMode2                        EQU        129
  445. kDepthMode3                        EQU        130
  446. kDepthMode4                        EQU        131
  447. kDepthMode5                        EQU        132
  448. kDepthMode6                        EQU        133
  449.  
  450. kFirstDepthMode                    EQU        128                    ; These constants are obsolete, and just included    
  451. kSecondDepthMode                EQU        129                    ; for clients that have converted to the above        
  452. kThirdDepthMode                    EQU        130                    ; kDepthModeXXX constants.                            
  453. kFourthDepthMode                EQU        131
  454. kFifthDepthMode                    EQU        132
  455. kSixthDepthMode                    EQU        133
  456.  
  457. VDPageInfo                 RECORD    0
  458. csMode                     ds.w   1        ; offset: $0 (0)        ;(word) mode within device
  459. csData                     ds.l   1        ; offset: $2 (2)        ;(long) data supplied by driver
  460. csPage                     ds.w   1        ; offset: $6 (6)        ;(word) page to switch in
  461. csBaseAddr                 ds.l   1        ; offset: $8 (8)        ;(long) base address of page
  462. sizeof                     EQU *            ; size:   $C (12)
  463.                         ENDR
  464.  
  465. ; typedef struct VDPageInfo  VDPageInfo
  466. ; typedef VDPageInfo         *VDPgInfoPtr
  467. VDSizeInfo                 RECORD    0
  468. csHSize                     ds.w   1        ; offset: $0 (0)        ;(word) desired/returned h size
  469. csHPos                     ds.w   1        ; offset: $2 (2)        ;(word) desired/returned h position
  470. csVSize                     ds.w   1        ; offset: $4 (4)        ;(word) desired/returned v size
  471. csVPos                     ds.w   1        ; offset: $6 (6)        ;(word) desired/returned v position
  472. sizeof                     EQU *            ; size:   $8 (8)
  473.                         ENDR
  474.  
  475. ; typedef struct VDSizeInfo  VDSizeInfo
  476. ; typedef VDSizeInfo         *VDSzInfoPtr
  477. VDSettings                 RECORD    0
  478. csParamCnt                 ds.w   1        ; offset: $0 (0)        ;(word) number of params
  479. csBrightMax                 ds.w   1        ; offset: $2 (2)        ;(word) max brightness
  480. csBrightDef                 ds.w   1        ; offset: $4 (4)        ;(word) default brightness
  481. csBrightVal                 ds.w   1        ; offset: $6 (6)        ;(word) current brightness
  482. csCntrstMax                 ds.w   1        ; offset: $8 (8)        ;(word) max contrast
  483. csCntrstDef                 ds.w   1        ; offset: $A (10)        ;(word) default contrast
  484. csCntrstVal                 ds.w   1        ; offset: $C (12)        ;(word) current contrast
  485. csTintMax                 ds.w   1        ; offset: $E (14)        ;(word) max tint
  486. csTintDef                 ds.w   1        ; offset: $10 (16)        ;(word) default tint
  487. csTintVal                 ds.w   1        ; offset: $12 (18)        ;(word) current tint
  488. csHueMax                 ds.w   1        ; offset: $14 (20)        ;(word) max hue
  489. csHueDef                 ds.w   1        ; offset: $16 (22)        ;(word) default hue
  490. csHueVal                 ds.w   1        ; offset: $18 (24)        ;(word) current hue
  491. csHorizDef                 ds.w   1        ; offset: $1A (26)        ;(word) default horizontal
  492. csHorizVal                 ds.w   1        ; offset: $1C (28)        ;(word) current horizontal
  493. csHorizMax                 ds.w   1        ; offset: $1E (30)        ;(word) max horizontal
  494. csVertDef                 ds.w   1        ; offset: $20 (32)        ;(word) default vertical
  495. csVertVal                 ds.w   1        ; offset: $22 (34)        ;(word) current vertical
  496. csVertMax                 ds.w   1        ; offset: $24 (36)        ;(word) max vertical
  497. sizeof                     EQU *            ; size:   $26 (38)
  498.                         ENDR
  499.  
  500. ; typedef struct VDSettings  VDSettings
  501. ; typedef VDSettings         *VDSettingsPtr
  502. VDDefMode                 RECORD    0
  503. csID                     ds.b   1        ; offset: $0 (0)
  504. filler                     ds.b   1        ; offset: $1 (1)
  505. sizeof                     EQU *            ; size:   $2 (2)
  506.                         ENDR
  507.  
  508. ; typedef struct VDDefMode     VDDefMode
  509. ; typedef VDDefMode         *VDDefModePtr
  510. VDSyncInfoRec             RECORD    0
  511. csMode                     ds.b   1        ; offset: $0 (0)
  512. csFlags                     ds.b   1        ; offset: $1 (1)
  513. sizeof                     EQU *            ; size:   $2 (2)
  514.                         ENDR
  515.  
  516. ; typedef struct VDSyncInfoRec  VDSyncInfoRec
  517. ; typedef VDSyncInfoRec     *VDSyncInfoPtr
  518. ; typedef unsigned long     DisplayModeID
  519. ; typedef unsigned long     VideoDeviceType
  520. ; typedef unsigned long     GammaTableID
  521. ; Constants for the GetNextResolution call 
  522.  
  523. kDisplayModeIDCurrent            EQU        $0                    ; Reference the Current DisplayModeID 
  524. kDisplayModeIDInvalid            EQU        $ffffffff            ; A bogus DisplayModeID in all cases 
  525. kDisplayModeIDFindFirstResolution EQU        $fffffffe            ; Used in cscGetNextResolution to reset iterator 
  526. kDisplayModeIDNoMoreResolutions    EQU        $fffffffd            ; Used in cscGetNextResolution to indicate End Of List 
  527.  
  528. ; Constants for the GetGammaInfoList call 
  529. kGammaTableIDFindFirst            EQU        $fffffffe            ; Get the first gamma table ID 
  530. kGammaTableIDNoMoreTables        EQU        $fffffffd            ; Used to indicate end of list 
  531. kGammaTableIDSpecific            EQU        $0                    ; Return the info for the given table id 
  532.  
  533. VDResolutionInfoRec     RECORD    0
  534. csPreviousDisplayModeID     ds.l   1        ; offset: $0 (0)        ; ID of the previous resolution in a chain 
  535. csDisplayModeID             ds.l   1        ; offset: $4 (4)        ; ID of the next resolution 
  536. csHorizontalPixels         ds.l   1        ; offset: $8 (8)        ; # of pixels in a horizontal line at the max depth 
  537. csVerticalLines             ds.l   1        ; offset: $C (12)        ; # of lines in a screen at the max depth 
  538. csRefreshRate             ds.l   1        ; offset: $10 (16)        ; Vertical Refresh Rate in Hz 
  539. csMaxDepthMode             ds.w   1        ; offset: $14 (20)        ; 0x80-based number representing max bit depth 
  540. csResolutionFlags         ds.l   1        ; offset: $16 (22)        ; Reserved - flag bits 
  541. csReserved                 ds.l   1        ; offset: $1A (26)        ; Reserved 
  542. sizeof                     EQU *            ; size:   $1E (30)
  543.                         ENDR
  544.  
  545. ; typedef struct VDResolutionInfoRec  VDResolutionInfoRec
  546. ; typedef VDResolutionInfoRec  *VDResolutionInfoPtr
  547. VDVideoParametersInfoRec RECORD    0
  548. csDisplayModeID             ds.l   1        ; offset: $0 (0)        ; the ID of the resolution we want info on 
  549. csDepthMode                 ds.w   1        ; offset: $4 (4)        ; The bit depth we want the info on (0x80 based) 
  550. csVPBlockPtr             ds.l   1        ; offset: $6 (6)        ; Pointer to a video parameter block 
  551. csPageCount                 ds.l   1        ; offset: $A (10)        ; Number of pages supported by the resolution 
  552. csDeviceType             ds.l   1        ; offset: $E (14)        ; Device Type:  Direct, Fixed or CLUT; 
  553. csReserved                 ds.l   1        ; offset: $12 (18)        ; Reserved 
  554. sizeof                     EQU *            ; size:   $16 (22)
  555.                         ENDR
  556.  
  557. ; typedef struct VDVideoParametersInfoRec  VDVideoParametersInfoRec
  558. ; typedef VDVideoParametersInfoRec  *VDVideoParametersInfoPtr
  559. VDGammaInfoRec             RECORD    0
  560. csLastGammaID             ds.l   1        ; offset: $0 (0)        ; the ID of the previous gamma table 
  561. csNextGammaID             ds.l   1        ; offset: $4 (4)        ; the ID of the next gamma table 
  562. csGammaPtr                 ds.l   1        ; offset: $8 (8)        ; Ptr to a gamma table data 
  563. csReserved                 ds.l   1        ; offset: $C (12)        ; Reserved 
  564. sizeof                     EQU *            ; size:   $10 (16)
  565.                         ENDR
  566.  
  567. ; typedef struct VDGammaInfoRec  VDGammaInfoRec
  568. ; typedef VDGammaInfoRec     *VDGammaInfoPtr
  569. VDGetGammaListRec         RECORD    0
  570. csPreviousGammaTableID     ds.l   1        ; offset: $0 (0)        ; ID of the previous gamma table 
  571. csGammaTableID             ds.l   1        ; offset: $4 (4)        ; ID of the gamma table following csPreviousDisplayModeID 
  572. csGammaTableSize         ds.l   1        ; offset: $8 (8)        ; Size of the gamma table in bytes 
  573. csGammaTableName         ds.l   1        ; offset: $C (12)        ; Gamma table name (c-string) 
  574. sizeof                     EQU *            ; size:   $10 (16)
  575.                         ENDR
  576.  
  577. ; typedef struct VDGetGammaListRec  VDGetGammaListRec
  578. ; typedef VDGetGammaListRec  *VDGetGammaListPtr
  579. VDRetrieveGammaRec         RECORD    0
  580. csGammaTableID             ds.l   1        ; offset: $0 (0)        ; ID of gamma table to retrieve 
  581. csGammaTablePtr             ds.l   1        ; offset: $4 (4)        ; Location to copy desired gamma to 
  582. sizeof                     EQU *            ; size:   $8 (8)
  583.                         ENDR
  584.  
  585. ; typedef struct VDRetrieveGammaRec  VDRetrieveGammaRec
  586. ; typedef VDRetrieveGammaRec  *VDRetrieveGammaPtr
  587. VDSetHardwareCursorRec     RECORD    0
  588. csCursorRef                 ds.l   1        ; offset: $0 (0)        ; reference to cursor data 
  589. csReserved1                 ds.l   1        ; offset: $4 (4)        ; reserved for future use 
  590. csReserved2                 ds.l   1        ; offset: $8 (8)        ; should be ignored 
  591. sizeof                     EQU *            ; size:   $C (12)
  592.                         ENDR
  593.  
  594. ; typedef struct VDSetHardwareCursorRec  VDSetHardwareCursorRec
  595. ; typedef VDSetHardwareCursorRec  *VDSetHardwareCursorPtr
  596. VDDrawHardwareCursorRec RECORD    0
  597. csCursorX                 ds.l   1        ; offset: $0 (0)        ; x coordinate 
  598. csCursorY                 ds.l   1        ; offset: $4 (4)        ; y coordinate 
  599. csCursorVisible             ds.l   1        ; offset: $8 (8)        ; true if cursor is must be visible 
  600. csReserved1                 ds.l   1        ; offset: $C (12)        ; reserved for future use 
  601. csReserved2                 ds.l   1        ; offset: $10 (16)        ; should be ignored 
  602. sizeof                     EQU *            ; size:   $14 (20)
  603.                         ENDR
  604.  
  605. ; typedef struct VDDrawHardwareCursorRec  VDDrawHardwareCursorRec
  606. ; typedef VDDrawHardwareCursorRec  *VDDrawHardwareCursorPtr
  607. VDSupportsHardwareCursorRec RECORD    0
  608. csSupportsHardwareCursor ds.l   1        ; offset: $0 (0)
  609. ; true if hardware cursor is supported 
  610. csReserved1                 ds.l   1        ; offset: $4 (4)        ; reserved for future use 
  611. csReserved2                 ds.l   1        ; offset: $8 (8)        ; must be zero 
  612. sizeof                     EQU *            ; size:   $C (12)
  613.                         ENDR
  614.  
  615. ; typedef struct VDSupportsHardwareCursorRec  VDSupportsHardwareCursorRec
  616. ; typedef VDSupportsHardwareCursorRec  *VDSupportsHardwareCursorPtr
  617. VDHardwareCursorDrawStateRec RECORD    0
  618. csCursorX                 ds.l   1        ; offset: $0 (0)        ; x coordinate 
  619. csCursorY                 ds.l   1        ; offset: $4 (4)        ; y coordinate 
  620. csCursorVisible             ds.l   1        ; offset: $8 (8)        ; true if cursor is visible 
  621. csCursorSet                 ds.l   1        ; offset: $C (12)        ; true if cursor successfully set by last set control call 
  622. csReserved1                 ds.l   1        ; offset: $10 (16)        ; reserved for future use 
  623. csReserved2                 ds.l   1        ; offset: $14 (20)        ; must be zero 
  624. sizeof                     EQU *            ; size:   $18 (24)
  625.                         ENDR
  626.  
  627. ; typedef struct VDHardwareCursorDrawStateRec  VDHardwareCursorDrawStateRec
  628. ; typedef VDHardwareCursorDrawStateRec  *VDHardwareCursorDrawStatePtr
  629. VDConvolutionInfoRec     RECORD    0
  630. csDisplayModeID             ds.l   1        ; offset: $0 (0)        ; the ID of the resolution we want info on 
  631. csDepthMode                 ds.w   1        ; offset: $4 (4)        ; The bit depth we want the info on (0x80 based) 
  632. csPage                     ds.l   1        ; offset: $6 (6)
  633. csFlags                     ds.l   1        ; offset: $A (10)
  634. csReserved                 ds.l   1        ; offset: $E (14)
  635. sizeof                     EQU *            ; size:   $12 (18)
  636.                         ENDR
  637.  
  638. ; typedef struct VDConvolutionInfoRec  VDConvolutionInfoRec
  639. ; typedef VDConvolutionInfoRec  *VDConvolutionInfoPtr
  640. VDPowerStateRec         RECORD    0
  641. powerState                 ds.l   1        ; offset: $0 (0)
  642. powerFlags                 ds.l   1        ; offset: $4 (4)
  643. powerReserved1             ds.l   1        ; offset: $8 (8)
  644. powerReserved2             ds.l   1        ; offset: $C (12)
  645. sizeof                     EQU *            ; size:   $10 (16)
  646.                         ENDR
  647.  
  648. ; typedef struct VDPowerStateRec  VDPowerStateRec
  649. ; typedef VDPowerStateRec     *VDPowerStatePtr
  650.     ENDIF ; __VIDEO__
  651.